/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021.
 * Description: add external device dma to cache support
 * Author: xiekunxun <xiekunxun@huawei.com>
 * Create: 2018-12-18
 */

#ifndef _LINUX_HAL_HAL_DMA_INIT_H
#define _LINUX_HAL_HAL_DMA_INIT_H

#define DMA_USE_NORMAL	(0)
#define DMA_USE_ENHANCE	(1)
/*
 * Given that some SOC have SMMU(similar to IOMMU).
 * The peripheral device control modules in SOC, such as USB/GMAC/
 * will send or receive data from L3 cache directly after the SMMU enbale.
 * So we declare outer cache action in DMA
 * 0-DMA works without smmu, software needs to do outer cache cmo.
 * 1-DMA works with smmu enabled, software does NOT need to do outer cache cmo.
 * we set flag to 0 as default for almost all arm boards.
 */
extern unsigned int dma_cache_flag;
#endif
